package com.knight.concurrent.chapter6;

/**
 * @author: knight
 * @Date: 2019-03-04 20:50
 */
public class ThreadServiceTest {
    public static void main(String[] args) {
        ThreadService threadService = new ThreadService();
        long start = System.currentTimeMillis();
        threadService.execute(() -> {
            try {
                Thread.sleep(5_000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });

        threadService.shutDown(10_000);
        long end = System.currentTimeMillis();

        System.out.println(end - start);
    }
}
